project(lpc.lidar  VERSION 1.0.0)

find_package(Boost COMPONENTS system date_time regex REQUIRED)




aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/innolidar/src INNO_LIDAR_SRCS)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/lslidar/src LS_LIDAR_SRCS)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/apollolidar/lib/${CMAKE_SYSTEM_PROCESSOR})
message(${CMAKE_CURRENT_SOURCE_DIR}/apollolidar/lib/${CMAKE_SYSTEM_PROCESSOR})
add_library(${PROJECT_NAME} OBJECT      LidarBuilder.cpp
                                        lslidar/LsLidarAdapter.cpp 
                                        rslidar/RsLidarAdapter.cpp 
                                        innolidar/InnoLidarAdapter.cpp
                                        apollolidar/ApolloLidarAdapter.cpp
                                        ${INNO_LIDAR_SRCS} 
                                        ${LS_LIDAR_SRCS})



target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
target_compile_definitions(${PROJECT_NAME} PRIVATE BOOST_BIND_GLOBAL_PLACEHOLDERS=0)
include_directories(${Boost_INCLUDE_DIRS})
target_include_directories(
        ${PROJECT_NAME}
        PUBLIC $<INSTALL_INTERFACE:include>
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/innolidar/include>
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/lslidar/include>
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/rslidar/include>
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/apollolidar/include>
        PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})

target_link_libraries(${PROJECT_NAME} PRIVATE pthread   ${Boost_LIBRARIES} pcap)
target_link_libraries(${PROJECT_NAME} PUBLIC  lpc.util lpc.message AEyeSensorSDK)
# # test
# add_executable(test_Detection test_Detection.cpp)
# target_link_libraries(test_Detection mec.util ${PROJECT_NAME})
